package com.vonzhou.springinaction.springidol;

//@Component
public class InstrumentaList implements Performer {
	private Instrument instrument;


	public InstrumentaList(Instrument instrument) {
		this.instrument = instrument;
	}

	//	@Autowired
//	public InstrumentaList(Instrument instrument) {
//		this.instrument = instrument;
//	}

	public Instrument getInstrument() {
		return instrument;
	}


	public void setInstrument(Instrument instrument) {
		this.instrument = instrument;
	}

	@Override
	public void perform() throws PerformanceException {
		instrument.play();
	}
}
